package website.digitalocean.chapter13;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author: 582895699@qq.com
 * @Desctription:
 * @Date: Created in 2023/2/13 21:41
 */
@Slf4j
public class UserImpl extends User {
    public UserImpl(ChatMediator chatMediator, String name) {
        super(chatMediator, name);
    }

    @Override
    public void send(String msg) {
        chatMediator.sendMessage(msg, this);
        log.info("接收消息：{}; className:{}", msg, this.getClass().getSimpleName());
    }

    @Override
    public void receive(String msg) {
        log.info("收到消息:{}", msg);
    }
}
